<template>
  <div class="child">
    <h3>子组件</h3>
    <h4>a:{{ a }}</h4>
    <h4>其他:{{ $attrs }}</h4>
    <GrandChild v-bind="$attrs" />
  </div>
</template>

<script setup lang="ts">
import GrandChild from "./GrandChild.vue";
//现在不接收b c d
//b c d 都在attrs里面
defineProps(["a"]);
</script>

<style scoped>
.child {
  background: skyblue;
  padding: 10px;
  box-shadow: 0 0 10px black;
  border-radius: 10px;
}
</style>
